<aside class="sidebar">
    <!-- 公告 -->
    <?php $this->need('sidebar/bulletin.php'); ?>

    <!-- 搜索 -->
    <?php $this->need('sidebar/search.php'); ?>

    <!-- 推荐文章，当不是首页的时候显示 -->
    <?php if (!$this->is('index')): ?>
        <?php $this->need('sidebar/recommend-post.php'); ?>
    <?php endif; ?>

    <!-- 最新文章 -->
    <?php
    if (!empty($this->options->sidebarBlock) &&
        in_array('ShowRecentPosts', $this->options->sidebarBlock)):
    ?>
    <?php endif ?>

    <?php
    if (!empty($this->options->sidebarBlock) &&
        in_array('ShowRecentPosts', $this->options->sidebarBlock)):
    ?>
    <?php endif ?>

    <!-- 最新回复 -->
    <?php
    if (!empty($this->options->sidebarBlock) &&
        in_array('ShowRecentComments', $this->options->sidebarBlock)):
    ?>
        <?php $this->need('sidebar/newest-comment.php'); ?>
    <?php endif ?>

    <!-- 分类 -->
    <?php
    if (!empty($this->options->sidebarBlock) &&
        in_array('ShowCategory', $this->options->sidebarBlock)):
    ?>
    <?php endif ?>

    <!-- 归档 -->
    <?php
    if (!empty($this->options->sidebarBlock) &&
        in_array('ShowArchive', $this->options->sidebarBlock)):
        ?>
        <?php $this->need('sidebar/archive.php'); ?>
    <?php endif ?>

    <!-- 杂项 -->
    <?php
    if (!empty($this->options->sidebarBlock) &&
        in_array('ShowOther', $this->options->sidebarBlock)):
        ?>
    <?php endif ?>

    <!-- 标签云 -->
    <?php $this->need('sidebar/tag.php'); ?>

    <!-- 广告 -->
    <?php $this->need('sidebar/ad.php'); ?>

    <!-- 友情链接 -->
    <?php $this->need('sidebar/friend-link.php'); ?>
</aside>